﻿<%@ Page Title="" Language="C#" MasterPageFile="~/rightContent.Master" AutoEventWireup="true"
    CodeBehind="payment.aspx.cs" Inherits="WEB.T_bill.payment" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <style type="text/css">
        .style1
        {
            height: 31px;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="title" runat="server">
    应付款
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <asp:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server">
    </asp:ToolkitScriptManager>
    <table style="width: 100%;">
        <tr>
            <td colspan="2" align="center">
                <table width="600px" cellpadding="5" cellspacing="5">
                    <tr>
                        <td align="center">
                            <asp:Label ID="sheetID" runat="server" Text="委托单号："></asp:Label>
                            <asp:Label ID="lbsheetID" runat="server"></asp:Label>
                        </td>
                        <td align="center">
                            <asp:Label ID="clID" runat="server" Text="客户公司:"></asp:Label>
                            <asp:Label ID="lblCID" runat="server"> </asp:Label>
                        </td>
                        <td align="center">
                            <asp:Label ID="ladingBillNO" runat="server" Text="提单号:"></asp:Label>
                            <asp:Label ID="lbladingBillNO" runat="server"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <td align="center">
                            <asp:Label ID="agencyDate" runat="server" Text="日期:"></asp:Label>
                            <asp:Label ID="lbagencyDate" runat="server"></asp:Label>
                        </td>
                        <td align="center">
                            <asp:Label ID="goodsName" runat="server" Text="货名:"></asp:Label>
                            <asp:Label ID="lbgoodsName" runat="server"></asp:Label>
                        </td>
                        <td align="center">
                            <asp:Label ID="shipName" runat="server" Text="船名:"></asp:Label>
                            <asp:Label ID="lbshipName" runat="server"></asp:Label>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
            </td>
            <td>
                <asp:Label ID="lbmuban" runat="server" Text="模板："></asp:Label>
                <asp:DropDownList ID="ddlTemplate" runat="server" AppendDataBoundItems="True" AutoPostBack="True"
                    OnSelectedIndexChanged="ddlTemplate_SelectedIndexChanged">
                    <asp:ListItem Value="0">———请选择———</asp:ListItem>
                </asp:DropDownList>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="4">
                <asp:GridView ID="gvPayment" runat="server" 
                    AutoGenerateColumns="False" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None"
                    BorderWidth="1px" CellPadding="4" ForeColor="Black" GridLines="Vertical" CssClass="distance"
                    Width="1000px">
                    <AlternatingRowStyle BackColor="White" />
                    <Columns>
                        <asp:TemplateField HeaderText="序号" InsertVisible="False">
                            <ItemStyle HorizontalAlign="Center" />
                            <HeaderStyle HorizontalAlign="Center" Width="5%" />
                            <ItemTemplate>
                                <%#Container.DataItemIndex+1%>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="费用类别">
                            <ItemTemplate>
                                <asp:DropDownList ID="ddlfeeTypeID" runat="server" DataSource='<%#GetFeeType() %>'
                                    DataTextField="feeName" DataValueField="feeTypeNo" SelectedValue='<%# Eval("feeTypeID") %>'
                                    AppendDataBoundItems="True">
                                    <asp:ListItem Value="0">---请选择---</asp:ListItem>
                                </asp:DropDownList>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="费用金额">
                            <ItemTemplate>
                                <asp:TextBox ID="tbfeeAmount" Style="text-align: right" Text='<%# Eval("sfeeAmount") %>'
                                    onkeyup="if(isNaN(value))execCommand('undo')" onafterpaste="if(isNaN(value))execCommand('undo')"
                                    runat="server" MaxLength="13"></asp:TextBox>
                            </ItemTemplate>
                        </asp:TemplateField>
                        <asp:TemplateField HeaderText="备注">
                            <ItemTemplate>
                                <asp:TextBox ID="tbremark" runat="server" Text='<%# Eval("remark") %>' MaxLength="200"></asp:TextBox>
                                <asp:HiddenField ID="hfpayedID" runat="server" Value='<%#Eval("payedID") %>' />
                                <asp:HiddenField ID="hfauditEmpID" runat="server" Value='<%#Eval("auditEmpID") %>' />
                                <asp:HiddenField ID="hfafeeAmount" runat="server" Value='<%#Eval("afeeAmount") %>' />
                            </ItemTemplate>
                        </asp:TemplateField>
                    </Columns>
                    <FooterStyle BackColor="#CCCC99" />
                    <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
                    <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
                    <RowStyle BackColor="#F7F7DE" />
                    <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
                    <SortedAscendingCellStyle BackColor="#FBFBF2" />
                    <SortedAscendingHeaderStyle BackColor="#848384" />
                    <SortedDescendingCellStyle BackColor="#EAEAD3" />
                    <SortedDescendingHeaderStyle BackColor="#575357" />
                    <SortedAscendingCellStyle BackColor="#F8FAFA"></SortedAscendingCellStyle>
                    <SortedAscendingHeaderStyle BackColor="#246B61"></SortedAscendingHeaderStyle>
                    <SortedDescendingCellStyle BackColor="#D4DFE1"></SortedDescendingCellStyle>
                    <SortedDescendingHeaderStyle BackColor="#15524A"></SortedDescendingHeaderStyle>
                </asp:GridView>
            </td>
        </tr>
        <tr>
            <td colspan="2" align="center" class="style1">
                <asp:Button ID="btnAddRow" runat="server" Text="添加一行" OnClick="btnAddRow_Click" CssClass="Submit_yellowbig" />
            </td>
        </tr>
        <tr>
            <td>
                &nbsp;
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:Label ID="lbaudit" runat="server" Text=""></asp:Label>
                
            </td>
            <td align="center">
                <asp:Label ID="inputEmpNo" runat="server" Text="制单人："></asp:Label>
                <asp:Label ID="lblinputEmpNum" runat="server" Text="       "></asp:Label>
            </td>
        </tr>
        <tr>
            <td align="center">
                <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click" CssClass="Submit_yellow" />
                &nbsp;
                   <asp:Button ID="Button4" runat="server" Text="审核"  CssClass="Submit_yellow" 
                    onclick="Button4_Click" Width="46px" />
                &nbsp;
             <asp:Button ID="Button1" runat="server" Text="应收款录入"  CssClass="Submit_yellowbig" 
                    onclick="Button1_Click" />
                &nbsp; 
                <asp:Button ID="Button2" runat="server" Text="实收销账"  
                    CssClass="Submit_yellowbig" onclick="Button2_Click" />
                &nbsp; 
                <asp:Button ID="Button3" runat="server" Text="实付销账"  
                    CssClass="Submit_yellowbig" onclick="Button3_Click" />
                &nbsp;
                <span style="width: 50px;">&nbsp;&nbsp;&nbsp; </span>
               
            </td>
            <td align="center">
             <input id="return" class="Submit_yellowbig" onclick="window.history.go(-1)" 
                                type="button" value="返回" />
            </td>
        </tr>
    </table>
</asp:Content>
